<?php
namespace Home\Model;
use Think\Model;

class OfficeStationeryModel extends Model{
	
	const DELETE_STATUS = -1;
	protected $tableName = 'office_stationery';
	
	/*public function delete($ids=array()){
        // return $this->where(array('id'=>array('in', $ids )))->save(array('status'=>-1));
        $id_arr = explode(",", $ids);
        return $this->data(array('info_status'=>self::DELETE_STATUS))->where(array('id'=> array('in', $id_arr)))->save();
    }*/
	
	protected $attributes = array(
     '1'=>'消耗类',
     '2'=>'固有类',
    );
	
	public function getAttributes($index){
    	if (!empty($index)) {
    		return $this->attributes[$index];
    	} else {
    		return $this->attributes;
    	}
    }
	
	protected $type = array(
     '1'=>'文具/财务',
     '2'=>'办公耗材',
     '3'=>'日杂百货',
     '4'=>'办公设备',
     '5'=>'食品/饮料',
     '6'=>'礼品/卡卷',
    );
	
	public function getTypes($index){
    	if (!empty($index)) {
    		return $this->type[$index];
    	} else {
    		return $this->type;
    	}
    }
}
